home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
varia
/
idioms.lha
/
idioms
/
10-2.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-04
|
755b
|
23 lines
/* Copyright (c) 1992 by AT&T Bell Laboratories. */
/* Advanced C++ Programming Styles and Idioms */
/* James O. Coplien */
/* All rights reserved. */
class EditWindow {
public:
void addch(char x) { window->addch(x); }
void addstr(string x) { window->addstr(x); }
void clear() { window->clear(); }
. . . .
EditWindow() { if (\fIthis_is_an_X_environment\f5) {
window = new XWindow;
. . . .
} else {
window = new CursesWindow;
. . . .
} }
private:
Window *window;
short topLine, bottomLine;
};